import { Component } from '@angular/core';
import { Location } from '@angular/common';

@Component({
    moduleId: module.id,
    selector: 'back',
    template: ` <button type="button" class="exbtn exbtn-secondary" (click)="goBack()">返回</button>`,
})
export class BackComponent {

    constructor(
        private location: Location,
    ) { }

    // 返回
    goBack(): void {
        this.location.back();
    }
}